package com.subang.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.subang.system.mapper.SysUserPointsDetailMapper;
import com.subang.system.domain.SysUserPointsDetail;
import com.subang.system.service.ISysUserPointsDetailService;

/**
 * 用户积分明细Service业务层处理
 * 
 * @author subei
 * @date 2025-08-13
 */
@Service
public class SysUserPointsDetailServiceImpl implements ISysUserPointsDetailService 
{
    @Autowired
    private SysUserPointsDetailMapper sysUserPointsDetailMapper;

    /**
     * 查询用户积分明细
     * 
     * @param id 用户积分明细主键
     * @return 用户积分明细
     */
    @Override
    public SysUserPointsDetail selectSysUserPointsDetailById(Long id)
    {
        return sysUserPointsDetailMapper.selectSysUserPointsDetailById(id);
    }

    @Override
    public SysUserPointsDetail selectSysUserIntegralByUserId(Long userId) {
        return sysUserPointsDetailMapper.selectSysUserIntegralByUserId(userId);
    }

    /**
     * 查询用户积分明细列表
     * 
     * @param sysUserPointsDetail 用户积分明细
     * @return 用户积分明细
     */
    @Override
    public List<SysUserPointsDetail> selectSysUserPointsDetailList(SysUserPointsDetail sysUserPointsDetail)
    {
        return sysUserPointsDetailMapper.selectSysUserPointsDetailList(sysUserPointsDetail);
    }

    /**
     * 新增用户积分明细
     * 
     * @param sysUserPointsDetail 用户积分明细
     * @return 结果
     */
    @Override
    public int insertSysUserPointsDetail(SysUserPointsDetail sysUserPointsDetail)
    {
        return sysUserPointsDetailMapper.insertSysUserPointsDetail(sysUserPointsDetail);
    }

    /**
     * 修改用户积分明细
     * 
     * @param sysUserPointsDetail 用户积分明细
     * @return 结果
     */
    @Override
    public int updateSysUserPointsDetail(SysUserPointsDetail sysUserPointsDetail)
    {
        return sysUserPointsDetailMapper.updateSysUserPointsDetail(sysUserPointsDetail);
    }

    /**
     * 批量删除用户积分明细
     * 
     * @param ids 需要删除的用户积分明细主键
     * @return 结果
     */
    @Override
    public int deleteSysUserPointsDetailByIds(Long[] ids)
    {
        return sysUserPointsDetailMapper.deleteSysUserPointsDetailByIds(ids);
    }

    /**
     * 删除用户积分明细信息
     * 
     * @param id 用户积分明细主键
     * @return 结果
     */
    @Override
    public int deleteSysUserPointsDetailById(Long id)
    {
        return sysUserPointsDetailMapper.deleteSysUserPointsDetailById(id);
    }
}
